package com.yihu.cms.action;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.yihu.beans.products.ProductsType;
import com.yihu.cms.service.ProductsTypeService;


@Controller
public class ProductsTypeController extends BaseController {
	
	protected final Logger log = LoggerFactory.getLogger(this.getClass());
	
	ProductsTypeService pts = new ProductsTypeService();
		
	@RequestMapping(value = "/productsType/get", produces = "application/json; charset=utf-8", method = RequestMethod.GET)
	public @ResponseBody Object getProductsTypeList()
	{
		log.info("productsType get .");
		ProductsType pt = pts.getProductType();
		String response = JSON.toJSONString(pt);
		log.info("response=" + response);
		return response;
	}

}
